<template>
  <div>
    <div class="rect" style="top:628px;height:257px"></div>
    <div class="wrap">
      <div class="flex-row-center-center table-title">历史事件</div>
      <div class="kq-table-wrap">
        <div class="kq-table">
          <div class="flex-row-start-start">
            <div class="kq-table-id table-title-style">库区</div>
            <div class="kq-table-title table-title-style">检测点</div>
            <div class="kq-table-title  table-title-style" >检测数值</div>
            <div class="kq-table-time table-title-style" style="width:30%">检测时间</div>
          </div>
          <div class="scroll-container">
            <div v-for="(item,index) in eventList" :key="item.jcEventId" class="table-unit flex-row-center-center" >
              <div class="kq-table-id  table-unit-value1">{{item.kqName}}</div>
              <div class="kq-table-title  table-unit-value1">{{item.jcdName}}</div>
              <div class="kq-table-title table-unit-value1" :style="{ color: item.jcValue !== 0 ? 'red' : 'black' }">{{item.jcValue}}</div>
              <div class="kq-table-time" style="width:30%">
                <div class="  table-unit-value2" >{{item.jcTime}}</div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: [
        { id: 1, title: "连通性", time: "2020年8月12日" },
        { id: 2, title: "泄漏", time: "2020年3月14日" },
        { id: 3, title: "环空泄漏", time: "2019年5月23日" },
      ],
      selQk: "",
    };
  },
  props: {
    eventList:Array
  },
};
</script>
<style scoped>

.table-title {
  width: 100%;
  height: 41px;
  
  background: #cc0000;
  font-size: 28px;
  font-family: SourceHanSansSC-regular;
  color:black;
}
.table-unit-value1 {
  color:black;
  font-size: 14px;
  text-align: center;
  font-family: SourceHanSansSC-regular;
}
.table-unit-value2 {
  color:black;
  font-size: 14px;
  text-align: center;
  font-family: SourceHanSansSC-regular;
}
.table-unit {
  height: 44px;
  line-height: 20px;
  color: black;
  font-size: 14px;
  text-align: center;
  font-family: Roboto;
  /* border: 1px solid rgba(255, 255, 255, 100); */
}
.table-title-style {
  height: 20px;
  color: black;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  font-family: SourceHanSansSC-regular;
}
.kq-table-id {
  width: 20%;
}
.kq-table-title {
  width: 30%;
}
.kq-table-title {
  width: 35%;
}
.kq-table-time {
  width: 45%;
}
.kq-table-wrap {

}
.kq-table {
  margin-top: 28px;
  margin-left: 41px;
  margin-right: 28px;
}
.wrap {
  width: 100%;
  height: 252px;
  background-color: none;
  color: rgba(16, 16, 16, 100);
  font-size: 14px;
  text-align: center;
  box-shadow: 0px 2px 6px 0px rgba(255,157,160, 60);
  font-family: Roboto;
  border: 1px solid #cc0000;
}
.scroll-container {
  height: 140px; /* 你可以根据需要设置高度 */
  overflow-y: auto; /* 启用垂直滚动条 */
  margin-top: 12px;
}
/* 自定义滚动条轨道 */
.scroll-container::-webkit-scrollbar {
  width: 12px; /* 垂直滚动条的宽度 */
}

/* 自定义滚动条轨道的轨道 */
.scroll-container::-webkit-scrollbar-track {
  background: #f1f1f1; /* 轨道颜色 */
  border-radius: 6px; /* 轨道圆角 */
}

/* 自定义滚动条轨道的滑块 */
.scroll-container::-webkit-scrollbar-thumb {
  background: #888; /* 滑块颜色 */
  border-radius: 6px; /* 滑块圆角 */
  border: 3px solid #f1f1f1; /* 添加边框 */
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2); /* 添加阴影 */
}

/* 自定义滚动条轨道的滑块:hover状态 */
.scroll-container::-webkit-scrollbar-thumb:hover {
  background: #555; /* 滑块hover颜色 */
}
</style>